package com.dys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @className: com.dys.controller.ExceptionController2
 * @description: 被全局异常捕获
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/11/01 21:04
 */
@Controller
public class ExceptionController2 {

    @RequestMapping(value = "testExp1.action")
    public String testExp1() {
        int i = 1 / 0;
        return "forward:/ok.jsp";
    }

    @RequestMapping(value = "testExp2.action")
    public String testExp2() {
        String s1 = null;
        System.out.println(s1.length());
        return "forward:/ok.jsp";
    }
}
